<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }
    .carousel {
      position: relative;
      width: 800px;
      height: 500px;
      margin: 50px auto;
      border: 1px solid #000;
      overflow: hidden;
    }
    .carousel .pic {
      position: absolute;
      left: 0;
      width: 5000px;
      height: 500px;
      transition: 2s ease;
      -webkit-animation: move 10s ease infinite;
    }    
    .carousel .pic img {
      float: left;
      width: 800px;
      height: 500px;
    }    
    
    @keyframes move {
      0% {
        left: 0;
      }
      33.33% {
        left: -800px;
      }
      66.66% {
        left: -1600px;
      }
      100% {
        left: -2400px;
      }
    }
  </style>
</head>
<body>
  <div class="carousel">
    <div class="pic">
      <img src="images/01.jpg" alt="">
      <img src="images/02.jpg" alt="">
      <img src="images/03.jpg" alt="">
      <img src="images/01.jpg" alt="">
    </div>
  </div>
</body>
</html>